import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import VueParticles from 'vue-particles'
import * as echarts from 'echarts'
import Moment from 'moment'

Vue.prototype.$echarts = echarts
Vue.use(Moment)

Vue.use(VueParticles)
//导入全局样式
import './assets/css/global.css';
import axios from 'axios'
//设置请求的根路径
axios.defaults.baseURL = 'http://localhost:8080/'
axios.interceptors.request.use(config => {
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})
Vue.prototype.$http = axios

Vue.config.productionTip = false
Vue.use(ElementUI)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
